import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import study from '../components/study.vue'
import manage from "../components/manage";
import Login from "../views/Login"
import Login_old from "../views/Login_old"
import Login_CaoMengYao from "../views/Login_CaoMengYao";

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:Login,
    component:Login
  },
  {
    path:'/Login_old',
    name:Login_old,
    component:Login_old
  },
  {
    path: '/Login_CaoMengYao',
    name:Login_CaoMengYao,
    component: Login_CaoMengYao
  },
  {
    path: '/Login',
    name:Login,
    component: Login
  },
  {
    path: '/Home',
    name: 'Home',
    redirect:'/Home/study',
    component: Home,
    children:[
      {
        path:'study',
        name:'study',//打卡页面
        component:study,

      },
      {
        path:'manage',
        name:'manage',//管理页面
        component: manage
      }

    ],
  },

  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
